
import HttpClient from '../utils/request';

import type { bannerReqType, bannerResType, bannerReqStateType, bannerResStateType ,bannerResDataType,bannerFormReqType} from './../types/bannerType';

// 获取用户列表
export const getBannerList = (e: bannerReqType) => {
    return HttpClient.request<bannerResType>({
        url: '/platform/banner/getBannerList',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 上下架
export const updateBannerStatus = (e: bannerReqStateType) => {
    return HttpClient.request<bannerResStateType>({
        url: '/platform/banner/updateBannerStatus',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 获取详细
export const getBannerDetail = (e: {bannerId:number}) => {
    return HttpClient.request<bannerResDataType>({
        url: '/platform/banner/getBannerDetail',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 新增
export const createBanner = (e: bannerFormReqType) => {
    return HttpClient.request<any>({
        url: '/platform/banner/createBanner',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 编辑
export const updateBanner = (e: bannerFormReqType) => {
    return HttpClient.request<any>({
        url: '/platform/banner/updateBanner',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}








